<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .input_text {
            border: 1px solid #d9d9d9;
            color: #aaa;
            outline: none;
        }

        .input_text_focus {
            border: 1px solid #ffd6db;
            color: #333;
            outline: none;
        }
    </style>
</head>

<body>
    <div class="new_header">
        <div class="new_wrap">
            <form id="hder_login_form_new" method="post">
                <input type="text" class="input_text" id="uname" value="邮箱/ID/手机号">
            </form>
        </div>
    </div>
    <script>
        window.onload = function () {
            const ipt = document.querySelector('#uname');
            ipt.addEventListener('focus', function () {
                ipt.className = 'input_text_focus';
                ipt.value = '';
            });
            ipt.addEventListener('blur', function () {
                if (ipt.value == '') {
                    ipt.className = 'input_text';
                    ipt.value = '邮箱/ID/手机号';
                    // console.log(true);
                }
                else {
                    console.log(false);
                }
            })
        }
    </script>
</body>

</html>